<template>
  <div class="tabbar">
    <div class="tabbar-item">
      <router-link to="/index" tag="div" active-class="tabactiave"><van-icon name="home-o" size="24"/><span>首页</span></router-link>
      <router-link to="/meau" tag="div" active-class="tabactiave"><van-icon name="apps-o" size="24" /><span>分类</span></router-link>
      <router-link to="/shopcar" tag="div" active-class="tabactiave"><van-icon name="cart-o" size="24" /><span>购物车</span></router-link>
      <router-link to="/center" tag="div" active-class="tabactiave"><van-icon name="user-o" size="24" /><span>我</span></router-link>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import { Icon } from 'vant'

Vue.use(Icon)
export default {
  data () {
    return {
      active: 0,
      tocenter: '/center'
    }
  }
}
</script>

<style lang="scss">
  .tabbar{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    .tabbar-item{
      height: 50px;
      background: #ffffff;
      color: #808080;
      div{
        float: left;
        width: 25%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        span{
          font-size: 12px;
        }
      }
      .tabactiave{
        color: #000000;
      }
    }
  }
</style>
